<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<input type="text" placeholder="员工姓名" id="i1">
<input type="text" placeholder="员工工资" id="i2">
<input type="text" placeholder="员工工作" id="i3">
<input type="button" value="添加" onclick="f()">
<table border="1">
  <tr>
    <th>员工姓名</th>
    <th>员工工资</th>
    <th>员工工作</th>
  </tr>
</table>
<script>
  function f() {
    let tr = document.createElement("tr");
    let nametd = document.createElement("td");
    let salarytd = document.createElement("td");
    let jobtd  = document.createElement("td");
    nametd.innerHeight = i1.value;
    salarytd.innerHeight = i2.value;
    jobtd.innerHeight = i3.value;
    tr.appendChild(nametd);
    tr.appendChild(salarytd);
    tr.appendChild(jobtd);
    let t = document.querySelector("table");
    table.appear(tr);

  }
</script>
</body>
</html>